package com.pzb.web.controller.page;
import com.pzb.common.core.controller.BaseController;
import com.pzb.common.core.domain.AjaxResult;
import com.pzb.page.service.IPgPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 页面管理Controller
 * 
 * @author pzb
 * @date 2021-09-17
 */
@RestController
@RequestMapping("/page")
public class PgPageController extends BaseController
{

    @Autowired
    private IPgPageService pgPageService;

    /**
     * 查询主页面
     */
    @GetMapping("/getHomePage")
    public AjaxResult getHomePage(@RequestParam("extAppid") String extAppid)
    {
        return AjaxResult.success(pgPageService.selectHomePage(extAppid));
    }

    /**
     * 查询页面元素
     */
    @GetMapping("/getPageInfo")
    public AjaxResult getPageInfo(@RequestParam("pageId") Long pageId)
    {
        return AjaxResult.success(pgPageService.getPageInfo(pageId));
    }

    /**
     * 查询主页面
     */
    @GetMapping("/getHotSearch")
    public AjaxResult getHotSearch(@RequestParam("extAppid") String extAppid)
    {
        return AjaxResult.success(pgPageService.selectPgSearchList(extAppid));
    }





}
